﻿<%@ Page Language="C#" MasterPageFile="~/WebSite/manager.Master" AutoEventWireup="true" CodeFile="m_data_out.aspx.cs" Inherits="WebSite_m_data_out" Title="无标题页" %>


<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder2">
<div>
                    <div style="height: 135px; width: 611px; margin-left: 0px;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label1" runat="server" Font-Size="Medium" Text="学院："></asp:Label>
&nbsp;&nbsp;
                        <asp:DropDownList ID="DropDownList1" runat="server" 
                            DataSourceID="XmlDataSource1" DataTextField="College" 
                            DataValueField="id" Width="95px"  >
                        </asp:DropDownList>
                        <asp:XmlDataSource ID="XmlDataSource1" runat="server" 
                            DataFile="~/WebSite/CollegeName.xml" TransformFile="~/WebSite/CollegeName.xslt">
                        </asp:XmlDataSource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label2" runat="server" Font-Size="Medium" Text="年级："></asp:Label>
                        <asp:DropDownList ID="DropDownList2" runat="server" 
                            DataSourceID="XmlDataSource2" DataTextField="grade" DataValueField="id"  Width="60px">
                        </asp:DropDownList>
                        <asp:XmlDataSource ID="XmlDataSource2" runat="server" 
                            DataFile="~/WebSite/Grade.xml" TransformFile="~/WebSite/Grade.xslt">
                        </asp:XmlDataSource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label3" runat="server" Font-Size="Medium" Text="性别："></asp:Label>
                        <asp:DropDownList ID="DropDownList3" runat="server"  Width="60px" Height="16px">
                        <asp:ListItem Value=1>全部</asp:ListItem>
                        <asp:ListItem Value=2>男</asp:ListItem>
                        <asp:ListItem Value=3>女</asp:ListItem>
                        </asp:DropDownList>
                        <br />
                        <br />
                        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label4" runat="server" Font-Size="Medium" Text="民族："></asp:Label>
&nbsp;&nbsp;
                        <asp:DropDownList ID="DropDownList4" runat="server" 
                            DataSourceID="SqlDataSource2" DataTextField="Nationality" 
                            DataValueField="Nationality" Width="90px">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CSHDBConnectionString %>" 
                            
                            SelectCommand="SELECT LTRIM(RTRIM(Nationality))  AS Nationality FROM NationalityTable">
                        </asp:SqlDataSource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label5" runat="server" Font-Size="Medium" Text="测试年份："></asp:Label>
                        <asp:DropDownList ID="DropDownList5" runat="server" Width="60px">
                            <asp:ListItem Value="1">全部</asp:ListItem>
                            <asp:ListItem Value="2">2008</asp:ListItem>
                            <asp:ListItem Value="2">2009</asp:ListItem>
                            <asp:ListItem Value="3">2010</asp:ListItem>
                        </asp:DropDownList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="Label6" runat="server" Font-Size="Medium" Text="生源地："></asp:Label>
                        <asp:DropDownList ID="DropDownList6" runat="server" 
                            DataSourceID="SqlDataSource3" DataTextField="Column1" 
                            DataValueField="Column1"  Width="70px">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CSHDBConnectionString %>" 
                            
                            SelectCommand="select ltrim(rtrim(cityname)) from provincetable where cityid=provinceid">
                        </asp:SqlDataSource>
                        <br />
                        <br />
                        <br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="列出数据" />
&nbsp;<div style="height: 399px; margin-top: 24px">
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:CSHDBConnectionString %>" 
                                SelectCommand="SELECT [UserId], [TestDate], [Weight], [Height], [VitalCapacity], [Stamina], [Strength], [Speed], [Other] FROM [PhysiqueTestResultView]"></asp:SqlDataSource>
                            <asp:ListView ID="ListView1" runat="server"  OnPagePropertiesChanged="ListView1_PagePropertiesChanged">
                                <ItemTemplate>
                                    <tr style="">
                                        <td>
                                            <asp:Label ID="学号" runat="server" Text='<%# Eval("UserId") %>' />
                                        </td>
                                       
                                        <td>
                                            <asp:Label ID="体重" runat="server" Text='<%# Eval("Weight") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="身高" runat="server" Text='<%# Eval("Height") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="肺活量" runat="server" 
                                                Text='<%# Eval("VitalCapacity") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="耐力项目" runat="server" Text='<%# Eval("Stamina") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="柔韧力量项目" runat="server" Text='<%# Eval("Strength") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="速度灵巧性项目" runat="server" Text='<%# Eval("Speed") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="奖惩项目" runat="server" Text='<%# Eval("Other") %>' />
                                        </td>
                                         <td>
                                            <asp:Label ID="测试时间" runat="server" Text='<%# Eval("TestDate.Year") %>' />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <tr style="">
                                        <td>
                                            <asp:Label ID="学号" runat="server" Text='<%# Eval("UserId") %>' />
                                        </td>
                                       
                                        <td>
                                            <asp:Label ID="体重" runat="server" Text='<%# Eval("Weight") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="身高" runat="server" Text='<%# Eval("Height") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="肺活量" runat="server" 
                                                Text='<%# Eval("VitalCapacity") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="耐力项目" runat="server" Text='<%# Eval("Stamina") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="柔韧力量项目" runat="server" Text='<%# Eval("Strength") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="速度灵巧性项目" runat="server" Text='<%# Eval("Speed") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="奖惩项目" runat="server" Text='<%# Eval("Other") %>' />
                                        </td>
                                         <td>
                                            <asp:Label ID="测试时间" runat="server" Text='<%# Eval("TestDate.Year") %>' />
                                        </td>
                                    </tr>
                                </AlternatingItemTemplate>
                                <EmptyDataTemplate>
                                    <table runat="server" style="">
                                        <tr>
                                            <td>
                                                无所搜索的数据。</td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                                <LayoutTemplate>
                                    <table runat="server">
                                        <tr runat="server">
                                            <td runat="server">
                                                <table ID="itemPlaceholderContainer" runat="server" border="1"  >
                                                    <tr runat="server" style="" align="center">
                                                        <th runat="server">
                                                            学号</th>
                                                        <th runat="server">
                                                            体重</th>
                                                        <th runat="server">
                                                           身高</th>
                                                        <th runat="server">
                                                            肺活量</th>
                                                        <th runat="server">
                                                            耐力项目</th>
                                                        <th runat="server">
                                                            柔韧力量项目</th>
                                                        <th runat="server">
                                                            速度灵巧性项目</th>
                                                        <th runat="server">
                                                            奖惩项目</th>
                                                         <th runat="server">
                                                           测试时间</th>
                                                    </tr>
                                                    <tr ID="itemPlaceholder" runat="server">
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr runat="server">
                                            <td runat="server" style="">
                                                <asp:DataPager ID="DataPager1" runat="server" >
                                                    <Fields>
                                                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                                            ShowLastPageButton="True" />
                                                    </Fields>
                                                </asp:DataPager>
                                            </td>
                                        </tr>
                                    </table>
                                </LayoutTemplate>
                                <EditItemTemplate>
                                    <tr style="">
                                        <td>
                                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" />
                                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="UserIdTextBox" runat="server" Text='<%# Bind("UserId") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TestDateTextBox" runat="server" 
                                                Text='<%# Bind("TestDate") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="WeightTextBox" runat="server" Text='<%# Bind("Weight") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="HeightTextBox" runat="server" Text='<%# Bind("Height") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="VitalCapacityTextBox" runat="server" 
                                                Text='<%# Bind("VitalCapacity") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="StaminaTextBox" runat="server" Text='<%# Bind("Stamina") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="StrengthTextBox" runat="server" 
                                                Text='<%# Bind("Strength") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="SpeedTextBox" runat="server" Text='<%# Bind("Speed") %>' />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="OtherTextBox" runat="server" Text='<%# Bind("Other") %>' />
                                        </td>
                                    </tr>
                                </EditItemTemplate>
                                <SelectedItemTemplate>
                                    <tr style="">
                                        <td>
                                            <asp:Label ID="UserIdLabel" runat="server" Text='<%# Eval("UserId") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="TestDateLabel" runat="server" Text='<%# Eval("TestDate.Year") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="WeightLabel" runat="server" Text='<%# Eval("Weight") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="HeightLabel" runat="server" Text='<%# Eval("Height") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="VitalCapacityLabel" runat="server" 
                                                Text='<%# Eval("VitalCapacity") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="StaminaLabel" runat="server" Text='<%# Eval("Stamina") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="StrengthLabel" runat="server" Text='<%# Eval("Strength") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="SpeedLabel" runat="server" Text='<%# Eval("Speed") %>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="OtherLabel" runat="server" Text='<%# Eval("Other") %>' />
                                        </td>
                                    </tr>
                                </SelectedItemTemplate>
                            </asp:ListView>
                            <div align="center" style="height: 22px; width: 248px; margin-left: 150px ; margin-top: 20px">
                                <asp:Button ID="PrintAll" runat="server" Text="打印所有页" />
                                <asp:Button ID="BuildExcel" runat="server" Text="生成Excel" OnClick="OnClickBuildExcel"/>
                            </div>
                        </div>
    </div>
</div>
</asp:Content>
